combit List & Label 29 - .NET Help
Programming Introduction / Other Important Concepts / Object Model (DOM)
In This Topic
    Object Model (DOM)
    In This Topic

    Whereas the Designer is providing a very comfortable and powerful interface for editing project files, it can often be desired to set object or report properties per code. For example, the application can display a dialog prior to the Designer with a data preselection and then start the Designer with a project already prepared with this selection. An example for that can be found in the installed sample Simple DOM Sample.

    Access to the object model is only available from the Professional Edition and higher.

    The following table lists the most important classes and properties of the combit.Reporting.Dom namespace. Within the single classes, the properties can easily be browsed via IntelliSense:

    Class Function

    ProjectList

    ProjectLabel

    ProjectCard

    The actual project classes. These represent the root element of the project. Key methods are OpenSave and Close.

    Important note: It is also possible when opening a project with DOM to specify that any errors should be ignored when editing. So it is possible to edit the project file even without accessing the original data source.

    But changes to the (data-) structure of the project, which are based on formulas or variables/fields of the data source, can not be considered and implemented. Because without data source then the formulas in the project are treated like placeholders, and thus then the section with the used variables (see LlGetUsedIdentifiers()) cannot be written correctly, if you append e.g. in a table further columns. The content of this section is then left unchanged when saving. The same applies in case a new table is inserted in a report container, which was not used before. In addition, the DOM types of individual elements in the project file cannot be correctly identified in this case.

    Only when the data source in the ListLabel object used is also known can the project be processed with DOM completely and without restrictions. Only then can any formulas etc. be interpreted to use the correct DOM type.

    <Project>.Objects A list of all objects within the project. The objects are descendants of ObjectBase and each object contains its own properties and enumerations (e.g. Text paragraphs).
    <Project>.Regions An enumeration of the layout regions of the project. A page dependent printer control can be realized this way for example. Further information can be found in Different Printer and Copies.
    ObjectText Represents a text object. Key property is Paragraphs, the actual content of the text.
    ObjectReportContainer Represents a report container. Key property is SubItems, the actual content of the report container.
    SubItemTable Represents a table within the report container. It consists of different line regions (Lines Property), which have different columns (Columns Property of a line).